package com.etoak.service.impl;

import com.etoak.entity.KnowledgeProposal;
import com.etoak.mapper.KnowledgeProposalMapper;
import com.etoak.service.IKnowledgeProposalService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author zhixuebin
 * @Date 2022/5/13
 */
@Service
public class KnowledgeProposalServiceImpl implements IKnowledgeProposalService {

    @Autowired
    KnowledgeProposalMapper knowledgeProposalMapper;

    @Override
    public int addProposal(KnowledgeProposal knowledgeProposal) {
        return knowledgeProposalMapper.addProposal(knowledgeProposal);
    }

    @Override
    public List<KnowledgeProposal> getProposalList(KnowledgeProposal knowledgeProposal) {
        return knowledgeProposalMapper.getProposalList(knowledgeProposal);
    }

    @Override
    public KnowledgeProposal getProposalById(String id) {
        return knowledgeProposalMapper.getProposalById(id);
    }

    @Override
    public int approve(KnowledgeProposal knowledgeProposal) {
        return knowledgeProposalMapper.approve(knowledgeProposal);
    }

    @Override
    public int updateProposal(KnowledgeProposal proposal) {
        return knowledgeProposalMapper.updateProposal(proposal);
    }
}
